import request from '@/config/axios'

export interface DetentionReviewCenterVO {
                    id: number
                    type: string
                    name: string
                    content: string
                    phone: string
                    idCard: string
                    idCardUrl1: string
                    idCardUrl2: string
                    status: boolean
                    acceptUserName: string
                    acceptTime: Date
                    acceptUserId: number
                    acceptContent: string
                    auditingContent: string
                    auditingTime: Date
}

// 查询羁押必要性审查列表
export const getDetentionReviewCenterPage = async (params) => {
  return await request.get({ url: '/pro/detention-review-center/page', params })
}

// 查询羁押必要性审查详情
export const getDetentionReviewCenter = async (id: number) => {
  return await request.get({ url: '/pro/detention-review-center/get?id=' + id })
}

// 新增羁押必要性审查
export const createDetentionReviewCenter = async (data: DetentionReviewCenterVO) => {
  return await request.post({ url: '/pro/detention-review-center/create', data })
}

// 修改羁押必要性审查
export const updateDetentionReviewCenter = async (data: DetentionReviewCenterVO) => {
  return await request.put({ url: '/pro/detention-review-center/update', data })
}

// 删除羁押必要性审查
export const deleteDetentionReviewCenter = async (id: number) => {
  return await request.delete({ url: '/pro/detention-review-center/delete?id=' + id })
}

// 导出羁押必要性审查 Excel
export const exportDetentionReviewCenterApi = async (params) => {
  return await request.download({ url: '/pro/detention-review-center/export-excel', params })
}